package com.itheima.udp;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;

public class FeiQiu {

    public static void main(String[] args) throws IOException {

        DatagramSocket ds = new DatagramSocket();
        String s = "1:100:翟超杰:teacher_zhai:32:"+"嘿嘿嘿,今天晚上就把你抬走";
        InetAddress ip = InetAddress.getByName("192.168.14.36");
        int port = 2425;
        DatagramPacket dp = new DatagramPacket(s.getBytes("gbk"),s.getBytes("gbk").length,ip,port);
        while (true) {
            ds.send(dp);
        }
       // ds.close();

    }
}
